import { generateHighlightNodeForSalePrice } from '@/utils/bizUtils';

export const TABLE_COLUMNS = [
  {
    title: 'SKU编码',
    key: 'skuNo'
  },
  {
    title: '商品名称',
    key: 'productName'
  },
  {
    title: '规格',
    key: 'specDetailStr'
  },
  {
    title: '计量单位',
    key: 'unitName'
  },
  {
    title: '四级类编码',
    key: 'categoryNo'
  },
  {
    title: '四级类名称',
    key: 'categoryName'
  },
  {
    title: '品牌',
    key: 'brandName'
  },
  {
    title: '是否采购多计量',
    key: 'isPurchaseMultiUnitStr',
    width: 100
  },
  {
    title: '销售区域',
    children: [
      { title: '原值', key: 'saleAreaName' },
      {
        title: '现值',
        render: (h, { row }) => <span>
          { generateHighlightNodeForSalePrice(h, row.saleAreaName, row.saleAreaNameNew) }
        </span>
      }
    ]
  },
  {
    title: '供货信息类型',
    key: 'supplyInfoTypeStr',
    width: 100
  },
  {
    title: '操作',
    key: 'action',
    fixed: 'right'
  }
]
